# Author:Foru
from datetime import datetime
d = datetime.today().weekday() #表示星期几
present = datetime.now().strftime("%Y-%m-%d %H:%M:%S") # 表示输出时的时间
h = datetime.today().hour # 表示今日日期中的小时

# 用户输入
user_data = "foru"
password_data = "123456"
count = 3 #循环次数
while True:
    count -= 1
    username = input("请输入您的账号：")
    password = input("请输入您的密码：")

    if user_data == username:
        if password_data == password:
            print("欢迎%s使用课程表" % (username)) # 占位符%s
            pass #通过
        else:
            if count == 0:
                print("您输入的账号或密码不正确，请再仔细想想，三分钟后再来尝试")
                break
            else:
                print("您输入的账号或密码不正确，请重新输入，您还有", count, "次机会，仔细想想哦！")
    else:
        if count == 0:
            print("你都输入三次了，还不对，三分钟后再来吧！")
            break
        else:
            print("您输入的账号或密码不正确，请重新输入，您还有", count, "次机会，仔细想想哦！")

    print("小K为您服务")

    import datetime #利用import模块导入函数datetime

    time = datetime.datetime.today().weekday()
    week_time = int(time) #整数

    if week_time == 0:
        print("Happy Day!")
    elif week_time == 1:
        print("08:00-09:30 定向越野 西体");
        print("10:35-12:00 大英 10-204");
        print("14:30-16:50 毛概 9-207");
    elif week_time == 2:
        print("14:30-15:55 新闻评论 3实206")
        print("18:45-20:10 摄影赏析 2-106")
        print("20:15-21:45 非遗赏析 4-206")
    elif week_time == 3:
        print("09:45-12:00 融合新闻学 新综612");
        print("18:45-20:10 大英 10-204");
    elif week_time == 4:
        print("09:45-12:00 Python 新综612")
        print("14:30-16:50 创业实践 1-301")
    elif week_time == 5:
        print("08:00-09:30 AI 新综612")
        print("10:35-12:00 毛概实践 7-402")

    else:
        print("WEEKEND!");
        print("REST AND HAPPY!")

    print("时间段课程：1：早上 2：下午 3：晚上 4：算了不想看了")
    choice = int(input("请输入你的选择: "))

    if choice == 1:
        if d == 1:
            print(present) #当print括号里加了双引号便是出现里面的文字，没有双引号时便是出现开头代指的时间
            print("1-2节 定向越野")
            print("4-5节 大英")
        elif d == 2:
            print(present)
            print("SLEEP!")
        elif d == 3:
            print(present)
            print("3-5节 融合新闻学")
        elif d == 4:
            print(present)
            print("3-5节 Python")
        elif d == 5:
            print(present)
            print("1-2节 AI课")
            print("4-5节 毛概实践")
        else:
            print(present)
            print("HAPPY AND REST!")

    elif  choice == 2:
        if d == 1:
            print(present)
            print("8-10节 毛概理论")
        elif d == 2:
            print(present)
            print("8-9节 新闻评论")
        elif d == 3:
            print(present)
            print("REST!")
        elif d == 4:
            print(present)
            print("8-10节 创业实践")
        else:
            print(present)
            print("HAPPY AND REST!")
    elif choice == 3:
        if d == 2:
            print(present)
            print("12-13节 摄影赏析")
            print("14-15节 非遗赏析")
        elif d == 3:
            print(present)
            print("12-13节 大英")
        else:
            print(present)
            print("HAPPY AND REST!")
    elif choice == 4:
        print("好好学习，天天向上，下次见！")
        break
    else:
        print("请按要求输入!!!")